//-----------------------------------------------------------------------
// <copyright file="a_OrderBase.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
	
using System;
using System.Data;
using System.ComponentModel;
using System.Collections;

namespace ThoiTrang.Entities
{
	[Serializable]
	public class a_OrderBase
	{
		
		#region Variable Declarations
		private int				oid = 0;
		private string				domSaleOrderNo = string.Empty;
		private int				customerID_UserID = 0;
		private int				billing_AddrID = 0;
		private int				shipping_AddrID = 0;
		private DateTime				orderDate = new DateTime(1900,1,1,0,0,0,0);
		private DateTime				modifiedDate = new DateTime(1900,1,1,0,0,0,0);
		private int				shipMethodID = 0;
		private bool				shippingOptions = false;
		private byte				instrumentType = 0;
		private int				instrumentID = 0;
		private decimal				subTotal = 0;
		private decimal				tax = 0;
		private decimal				promoTaxCredit = 0;
		private int				shipping_Weight = 0;
		private decimal				shipping_Handling = 0;
		private decimal				promoShippingCredit = 0;
		private bool				shipChargeNotIncluded = false;
		private decimal				couponCredit = 0;
		private decimal				userCredit = 0;
		private decimal				cODCharge = 0;
		private decimal				total = 0;
		private string				stage = string.Empty;
		private string				status = string.Empty;
		private byte				statusPayment = 0;
		private byte				statusShipping = 0;
		private int				backOrderCount = 0;
		private bool				isDelete = false;
		private int				domainID = 0;
		private string				approvalCode = string.Empty;
		private string				transID = string.Empty;
		private string				aVSCode = string.Empty;
		private string				secCode = string.Empty;
		private int				numOfRetry = 0;
		private string				payPal_PayerEmail = string.Empty;
		private bool				isPending = false;
		private bool				hasNote = false;
		private bool				shipAsGift = false;
		private decimal				discount = 0;
		private bool				couponValueType = false;
		private int				couponValue = 0;
		private int				typecoupon = 0;
		private string				couponID = string.Empty;
		private int				nofDiscount = 0;
		private bool				isDeclined = false;
		private int				userID_Approved = 0;
		private string				aVSZip = string.Empty;
		private int				processStatus = 0;
		private int				merchantStatus = 0;
		private bool				lotteryWon = false;
		private string				lotteryNum = string.Empty;
		#endregion
		
		#region Constructors
		public a_OrderBase() {}
		
		public a_OrderBase (
			int oid,
			string domSaleOrderNo,
			int customerID_UserID,
			int billing_AddrID,
			int shipping_AddrID,
			DateTime orderDate,
			DateTime modifiedDate,
			int shipMethodID,
			bool shippingOptions,
			byte instrumentType,
			int instrumentID,
			decimal subTotal,
			decimal tax,
			decimal promoTaxCredit,
			int shipping_Weight,
			decimal shipping_Handling,
			decimal promoShippingCredit,
			bool shipChargeNotIncluded,
			decimal couponCredit,
			decimal userCredit,
			decimal cODCharge,
			decimal total,
			string stage,
			string status,
			byte statusPayment,
			byte statusShipping,
			int backOrderCount,
			bool isDelete,
			int domainID,
			string approvalCode,
			string transID,
			string aVSCode,
			string secCode,
			int numOfRetry,
			string payPal_PayerEmail,
			bool isPending,
			bool hasNote,
			bool shipAsGift,
			decimal discount,
			bool couponValueType,
			int couponValue,
			int typecoupon,
			string couponID,
			int nofDiscount,
			bool isDeclined,
			int userID_Approved,
			string aVSZip,
			int processStatus,
			int merchantStatus,
			bool lotteryWon,
			string lotteryNum)
		
		{
			this.oid = oid;
			this.domSaleOrderNo = domSaleOrderNo;
			this.customerID_UserID = customerID_UserID;
			this.billing_AddrID = billing_AddrID;
			this.shipping_AddrID = shipping_AddrID;
			this.orderDate = orderDate;
			this.modifiedDate = modifiedDate;
			this.shipMethodID = shipMethodID;
			this.shippingOptions = shippingOptions;
			this.instrumentType = instrumentType;
			this.instrumentID = instrumentID;
			this.subTotal = subTotal;
			this.tax = tax;
			this.promoTaxCredit = promoTaxCredit;
			this.shipping_Weight = shipping_Weight;
			this.shipping_Handling = shipping_Handling;
			this.promoShippingCredit = promoShippingCredit;
			this.shipChargeNotIncluded = shipChargeNotIncluded;
			this.couponCredit = couponCredit;
			this.userCredit = userCredit;
			this.cODCharge = cODCharge;
			this.total = total;
			this.stage = stage;
			this.status = status;
			this.statusPayment = statusPayment;
			this.statusShipping = statusShipping;
			this.backOrderCount = backOrderCount;
			this.isDelete = isDelete;
			this.domainID = domainID;
			this.approvalCode = approvalCode;
			this.transID = transID;
			this.aVSCode = aVSCode;
			this.secCode = secCode;
			this.numOfRetry = numOfRetry;
			this.payPal_PayerEmail = payPal_PayerEmail;
			this.isPending = isPending;
			this.hasNote = hasNote;
			this.shipAsGift = shipAsGift;
			this.discount = discount;
			this.couponValueType = couponValueType;
			this.couponValue = couponValue;
			this.typecoupon = typecoupon;
			this.couponID = couponID;
			this.nofDiscount = nofDiscount;
			this.isDeclined = isDeclined;
			this.userID_Approved = userID_Approved;
			this.aVSZip = aVSZip;
			this.processStatus = processStatus;
			this.merchantStatus = merchantStatus;
			this.lotteryWon = lotteryWon;
			this.lotteryNum = lotteryNum;
		}
		#endregion
		
		#region Properties	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int OID
		{
			get { return oid; }
			set { oid = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string DomSaleOrderNo
		{
			get { return domSaleOrderNo; }
			set { domSaleOrderNo = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int CustomerID_UserID
		{
			get { return customerID_UserID; }
			set { customerID_UserID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Billing_AddrID
		{
			get { return billing_AddrID; }
			set { billing_AddrID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Shipping_AddrID
		{
			get { return shipping_AddrID; }
			set { shipping_AddrID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is datetime</value>
		public DateTime OrderDate
		{
			get { return orderDate; }
			set { orderDate = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is datetime</value>
		public DateTime ModifiedDate
		{
			get { return modifiedDate; }
			set { modifiedDate = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int ShipMethodID
		{
			get { return shipMethodID; }
			set { shipMethodID = value; }
		}
	
		/// <summary>
		/// 	1: all together, 0: shipped avail first, backorder later
		/// </summary>
		/// <value>This type is bit</value>
		public bool ShippingOptions
		{
			get { return shippingOptions; }
			set { shippingOptions = value; }
		}
	
		/// <summary>
		/// 	1=Credit Card, 2=COD Secured Check
		/// </summary>
		/// <value>This type is tinyint</value>
		public byte InstrumentType
		{
			get { return instrumentType; }
			set { instrumentType = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int InstrumentID
		{
			get { return instrumentID; }
			set { instrumentID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal SubTotal
		{
			get { return subTotal; }
			set { subTotal = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal Tax
		{
			get { return tax; }
			set { tax = value; }
		}
	
		/// <summary>
		/// 	not used
		/// </summary>
		/// <value>This type is money</value>
		public decimal PromoTaxCredit
		{
			get { return promoTaxCredit; }
			set { promoTaxCredit = value; }
		}
	
		/// <summary>
		/// 	rounded total shipping weight for this order
		/// </summary>
		/// <value>This type is int</value>
		public int Shipping_Weight
		{
			get { return shipping_Weight; }
			set { shipping_Weight = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal Shipping_Handling
		{
			get { return shipping_Handling; }
			set { shipping_Handling = value; }
		}
	
		/// <summary>
		/// 	not used
		/// </summary>
		/// <value>This type is money</value>
		public decimal PromoShippingCredit
		{
			get { return promoShippingCredit; }
			set { promoShippingCredit = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool ShipChargeNotIncluded
		{
			get { return shipChargeNotIncluded; }
			set { shipChargeNotIncluded = value; }
		}
	
		/// <summary>
		/// 	total of all applicable coupons
		/// </summary>
		/// <value>This type is money</value>
		public decimal CouponCredit
		{
			get { return couponCredit; }
			set { couponCredit = value; }
		}
	
		/// <summary>
		/// 	apply any credit in user's account w/ Max=OrderTotal
		/// </summary>
		/// <value>This type is money</value>
		public decimal UserCredit
		{
			get { return userCredit; }
			set { userCredit = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal CODCharge
		{
			get { return cODCharge; }
			set { cODCharge = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal Total
		{
			get { return total; }
			set { total = value; }
		}
	
		/// <summary>
		/// 	New, Viewed
		/// </summary>
		/// <value>This type is varchar</value>
		public string Stage
		{
			get { return stage; }
			set { stage = value; }
		}
	
		/// <summary>
		/// 	Incomplete,Pending, Complete, Cancel, Modify
		/// </summary>
		/// <value>This type is varchar</value>
		public string Status
		{
			get { return status; }
			set { status = value; }
		}
	
		/// <summary>
		/// 	np manual proc, np waiting customer, np waiting paypal, np auth declined, p auth approved
		/// </summary>
		/// <value>This type is tinyint</value>
		public byte StatusPayment
		{
			get { return statusPayment; }
			set { statusPayment = value; }
		}
	
		/// <summary>
		/// 	S pending, S complete, S Partial, C customer cancel, C Merchant Cancel
		/// </summary>
		/// <value>This type is tinyint</value>
		public byte StatusShipping
		{
			get { return statusShipping; }
			set { statusShipping = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int BackOrderCount
		{
			get { return backOrderCount; }
			set { backOrderCount = value; }
		}
	
		/// <summary>
		/// 	0 =  No, 1 = Yes
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsDelete
		{
			get { return isDelete; }
			set { isDelete = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int DomainID
		{
			get { return domainID; }
			set { domainID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string ApprovalCode
		{
			get { return approvalCode; }
			set { approvalCode = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string TransID
		{
			get { return transID; }
			set { transID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string AVSCode
		{
			get { return aVSCode; }
			set { aVSCode = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string SecCode
		{
			get { return secCode; }
			set { secCode = value; }
		}
	
		/// <summary>
		/// 	remain number of retry
		/// </summary>
		/// <value>This type is int</value>
		public int NumOfRetry
		{
			get { return numOfRetry; }
			set { numOfRetry = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string PayPal_PayerEmail
		{
			get { return payPal_PayerEmail; }
			set { payPal_PayerEmail = value; }
		}
	
		/// <summary>
		/// 	not used: to be deleted
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsPending
		{
			get { return isPending; }
			set { isPending = value; }
		}
	
		/// <summary>
		/// 	null=no note, 0=customer note, 1=domain note
		/// </summary>
		/// <value>This type is bit</value>
		public bool HasNote
		{
			get { return hasNote; }
			set { hasNote = value; }
		}
	
		/// <summary>
		/// 	0=no,1=yes
		/// </summary>
		/// <value>This type is bit</value>
		public bool ShipAsGift
		{
			get { return shipAsGift; }
			set { shipAsGift = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal Discount
		{
			get { return discount; }
			set { discount = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool CouponValueType
		{
			get { return couponValueType; }
			set { couponValueType = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int CouponValue
		{
			get { return couponValue; }
			set { couponValue = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Typecoupon
		{
			get { return typecoupon; }
			set { typecoupon = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string CouponID
		{
			get { return couponID; }
			set { couponID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int NofDiscount
		{
			get { return nofDiscount; }
			set { nofDiscount = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsDeclined
		{
			get { return isDeclined; }
			set { isDeclined = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int UserID_Approved
		{
			get { return userID_Approved; }
			set { userID_Approved = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string AVSZip
		{
			get { return aVSZip; }
			set { aVSZip = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int ProcessStatus
		{
			get { return processStatus; }
			set { processStatus = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int MerchantStatus
		{
			get { return merchantStatus; }
			set { merchantStatus = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool LotteryWon
		{
			get { return lotteryWon; }
			set { lotteryWon = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string LotteryNum
		{
			get { return lotteryNum; }
			set { lotteryNum = value; }
		}
	
		
		#endregion
	}//End Class
	
	public enum a_OrderColumns
	{
		OID,
		DomSaleOrderNo,
		CustomerID_UserID,
		Billing_AddrID,
		Shipping_AddrID,
		OrderDate,
		ModifiedDate,
		ShipMethodID,
		ShippingOptions,
		InstrumentType,
		InstrumentID,
		SubTotal,
		Tax,
		PromoTaxCredit,
		Shipping_Weight,
		Shipping_Handling,
		PromoShippingCredit,
		ShipChargeNotIncluded,
		CouponCredit,
		UserCredit,
		CODCharge,
		Total,
		Stage,
		Status,
		StatusPayment,
		StatusShipping,
		BackOrderCount,
		IsDelete,
		DomainID,
		ApprovalCode,
		TransID,
		AVSCode,
		SecCode,
		NumOfRetry,
		PayPal_PayerEmail,
		IsPending,
		HasNote,
		ShipAsGift,
		Discount,
		CouponValueType,
		CouponValue,
		Typecoupon,
		CouponID,
		NofDiscount,
		IsDeclined,
		UserID_Approved,
		AVSZip,
		ProcessStatus,
		MerchantStatus,
		LotteryWon,
		LotteryNum
	}//End enum
}